load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_filegroup")

licenses(["notice"])

exports_files_legacy()

# In own group for exporting to sksl.gni:skia_sksl_tracing_sources.
skia_filegroup(
    name = "enabled_srcs",
    srcs = select({
        "//src/sksl:enable_sksl_tracing_true": ["SkSLDebugTracePlayer.cpp"],
        "//src/sksl:enable_sksl_tracing_false": [],
    }),
)

# In own group for exporting to sksl.gni:skia_sksl_tracing_sources.
skia_filegroup(
    name = "enabled_hdrs",
    srcs = select({
        "//src/sksl:enable_sksl_tracing_true": ["SkSLDebugTracePlayer.h"],
        "//src/sksl:enable_sksl_tracing_false": [],
    }),
)

skia_filegroup(
    name = "srcs",
    srcs = [
        "SkSLDebugTracePriv.cpp",
        "SkSLTraceHook.cpp",
        ":enabled_srcs",
    ],
    visibility = ["//src/sksl:__pkg__"],
)

skia_filegroup(
    name = "skopts_hdrs",
    srcs = [
        "SkSLTraceHook.h",
    ],
    visibility = [
        "//src:__pkg__",
        "//src/opts:__pkg__",
    ],
)

skia_filegroup(
    name = "private_hdrs",
    srcs = [
        "SkSLDebugTracePriv.h",
        ":enabled_hdrs",
        ":skopts_hdrs",
    ],
    visibility = ["//src/sksl:__pkg__"],
)

skia_filegroup(
    name = "core_priv_hdrs",
    srcs = [
        "SkSLDebugTracePriv.h",
        "SkSLTraceHook.h",
    ],
    visibility = ["//src/sksl:__pkg__"],
)

skia_filegroup(
    name = "opts_srcs",
    srcs = [
        "SkSLTraceHook.h",
    ],
    visibility = ["//src/opts:__pkg__"],
)

skia_filegroup(
    name = "core_srcs",
    srcs = [
        "SkSLDebugTracePriv.cpp",
        "SkSLTraceHook.cpp",
    ],
    visibility = ["//src/sksl:__pkg__"],
)
